package dome2;

import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int ret = 0;
        double weight = scanner.nextDouble();
        if(weight<=1) {
            ret = 20;
        }else {
            ret = progressive(weight-1) + 20;
        }
        String str = scanner.next();
        char ch = str.charAt(0);
        if(ch=='y') {
            ret += 5;
        }
        System.out.println(ret);
        scanner.close();
    }
    public static int progressive(double num) {
        if(num%1==0) {
            return (int)num;
        }else {
            return (int)num+1 ;
        }
    }
}
